# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=socklog
pkgver=2.1.0
pkgrel=5
pkgdesc="System and kernel logging services for runit"
url="http://smarden.org/socklog/"
arch="all"
license="BSD"
install="$pkgname.post-install"
subpackages="$pkgname-doc"
source="http://smarden.org/socklog/socklog-$pkgver.tar.gz
	socklog.setup
	gcc14-incompatible-pointer-types.patch
	gcc14-implicit-function-declaration.patch
	"
options="!check" # no tests
builddir="$srcdir/admin/socklog-$pkgver/src"

build() {
	echo "$CC $CFLAGS" > conf-cc
	echo "$CC $LDFLAGS" > conf-ld
	make
}

package() {
	local i
	for i in socklog socklog-conf; do
		install -m755 -D "$i" "$pkgdir"/usr/sbin/$i
	done
	for i in socklog-check tryto uncat; do
		install -m755 -D "$i" "$pkgdir"/usr/bin/$i
	done

	install -d "$pkgdir"/usr/share/man/man8
	cd .. && cp -rf man/* "$pkgdir"/usr/share/man/man8/

	install -m754 "$srcdir"/socklog.setup "$pkgdir"/usr/sbin/setup-socklog
}

sha512sums="
920ce5e661a6a3d970fa77ee3c228d48699ea03530be2b43b7517458b25e31a0a7f352ece2d076c715b6d34dbb26b424b48eb0f55b9bcd0355b74d3e34c77ac7  socklog-2.1.0.tar.gz
6cf09fae91486bb327da5e41c9611dde7a36b5eb38221f7e18ca8e172e8c3764797241b576505017392aa7118f9d70bb90025d062f5906c5c89695756961918f  socklog.setup
b0136c440960a2eb395f2214d96f22d60216891064fd58007e60d62eba1d99d5a24f622734b6f92d113d0c0f824ad393589d9108197f0e6e8cbc1f87d84f42cf  gcc14-incompatible-pointer-types.patch
daf131edebf34dd6d7c997efc80b1f1b97908e441ef762ce7f873c1dfa9ef96a74e3bd8af7285fec13a68dd06cf961ff0d738f9743d13843fa3b1bfef7d495fb  gcc14-implicit-function-declaration.patch
"
